package com.laker.admin.module.excel.controller;

import com.laker.admin.framework.aop.Metrics;
import com.laker.admin.framework.model.Response;
import com.laker.admin.module.excel.domain.ExcelDataSource;
import com.laker.admin.module.excel.facade.ExcelDataSourceFacade;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * excel保存表格数据
 * </p>
 *
 * @author nihongxin
 * @since 2021-12-08
 */
@RestController
@RequestMapping("/excelDataSource")
@Metrics
public class ExcelDataSourceController {

    @Autowired
    private ExcelDataSourceFacade excelDataSourceFacade;

    @PostMapping("/save")
    @ApiOperation(value = "保存数据")
    public Response save(@RequestBody ExcelDataSource excelDataSource) {
        return excelDataSourceFacade.save(excelDataSource);
    }

}